package com.conferenceroom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.conferenceroom.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where username = #{username}")
    List<User> selectByUsername(String username);
    @Select("SELECT user_id, username FROM user WHERE username LIKE CONCAT('%', #{username}, '%')")
    List<Map<String, Object>> selectUserIdsByUsername(String username);

}
